<#include "/WEB-INF/common/header.ftl"/>
<script type="text/javascript">
	var pathToImages = '${brandingStaticLocation?default("")}/default/classic/image/calendar/';
	var showCheckbox = false;
	
	
	function save() {
	<#--
		clearAllInputItem();
		if (saveCheck()) {
			$("thisForm").submit();
		}
		-->
		$("thisForm").submit();
	}
	
	function changeview(flag) {
		if (flag) {
			$('planEndTimeTr').style.display = '';
			$('appointTr').style.display = 'none';
 			$('desTr').style.display = 'none';
 		} else {
 			$('planEndTimeTr').style.display = 'none';
 			$('appointTr').style.display = '';
 			$('desTr').style.display = '';
 		}
	}
</script>
<@taskMacro.showBrandingStyle "dhtmlgoodies_calendar.css"/>
<@taskMacro.showBrandingJs "dhtmlgoodies_calendar.js"/>
<div class="Main">
  <div class="Main_fix">
    <#include "/WEB-INF/common/side.ftl"/>
    <div class="Main_body" id="Main_body">
      <div class="Main_locationBar">
        <div class="Main_locationBar_head"></div>
        
        <div class="Main_locationBar_body"><span id="CurrentPosition">任务管理 -> 进度更新</span>
		</div>
        <div class="Main_locationBar_foot"></div>
      </div>
      <div class="Main_bodyEditBar">
		<div class="Main_bodyEditBar_head"><span>任务信息</span></div>
		<@opMacro.showActionResultMsg isSuccess=opResult/>
        <div class="Main_bodyEditBar_body">
          <form id="thisForm" method="post" action="${base}/task/updateprocess.action?menuname=${menuname?if_exists}"> 
          <input type="hidden" name="task.id" value="${taskId}"/>
          <input type="hidden" name="mineFlag" value="${mineFlag?string}"/>
          <table width="100%" border="0" cellpadding="0" cellspacing="1" class="editTable">
            <tbody>
              <tr>
                <td class="title">任务名称<em>*</em></td>
                <td class="content2">
                	${(task.name)?if_exists}
                </td>
			  </tr>
			  <tr>
			  	<td class="title">任务描述<em>*</em></td>
                <td class="content2">
                	<textarea class="textarea_middle2" name="task.description" id="description" readonly>${(task.name)?if_exists}</textarea>
                	
                </td>
			  </tr>
			  <tr>
                <td class="title">任务执行人<em>*</em></td>
                <td class="content"> 
                  	${(task.receiveUser.name)?if_exists}
                </td>
			  </tr>
			  <tr id="planEndTimeTr">
                <td class="title">计划完成时间<em>*</em></td>
                <td class="content"> 
                  	<#if (task.planEndTime)??>${task.planEndTime?string("yyyy-MM-dd")}</#if>
                </td>
			  </tr>
			  <tr>
                <td class="title">指派过程：</td>
                <td class="content"> 
                  	<#if (task.appointList)??>
                  		<#list task.appointList as appoint>
                  			${appoint.fromUser.name} --> ${appoint.toUser.name} <br>
                  		</#list>
                  	</#if>
                </td>
			  </tr>
			   <tr >
                <td class="title">进度：</td>
                <td class="content"> 
                	<#assign percents=[0,10,20,30,40, 50, 60, 70, 80, 90, 100]/>
			   		<select id="percent" name="task.percent">
			   			<#list percents as percent>
			   				<option value="${percent}" <#if (task.percent)?? && task.percent == percent>selected</#if>>${percent}%</option>
			   			</#list>
			   		</select>
                </td>
			  </tr>
            </tbody>
          </table>
          </form>
		</div>
        <div class="Main_bodyEditBar_foot"></div>
      </div>
      <div class="Main_buttonGroupBar">
        <div class="Main_buttonGroupBar_head"></div>
        
        <div class="Main_buttonGroupBar_body">
        
          <input type="button" class="button" value="保存" onclick="save();"/> 
          <#if mineFlag>
           <input type="button" class="button" value="返回" onclick="location.href='${base}/mytask/list.action?query_back=true&menuname=${menuname?if_exists}&mineFlag=${mineFlag?string}'"/>
         <#else>
         	<input type="button" class="button" value="返回" onclick="location.href='${base}/task/list.action?query_back=true&menuname=${menuname?if_exists}&mineFlag=${mineFlag?string}'"/>
         </#if> 
           
        </div>
        
        <div class="Main_buttonGroupBar_foot"></div>
      </div>
    </div>
  </div>
</div>
<#include "/WEB-INF/common/footer.ftl"/>
<#--
<#include "/template/default/common/common-js.ftl"/>
<#include "/template/default/common/js.ftl"/> -->
